home *** CD-ROM | disk | FTP | other *** search
/ US Department of Defenseā€¦ndamentals 1.0 2004 April / US Department of Defense: Firewall & Router Fundamentals 1.0 2004 April.iso / sco / interface / sco_Main.swf / scripts / DefineSprite_77 / frame_1 / DoAction.as
Text File  |  2004-03-29  |  1KB  |  71 lines

  1. function end(setTarget, frame)
  2. {
  3.    setTarget.gotoAndStop(setTarget._totalframes);
  4.    scrubTargetState = "stop";
  5. }
  6. function begin(setTarget, frame)
  7. {
  8.    setTarget.gotoAndStop(frame);
  9.    scrubTargetState = "stop";
  10. }
  11. function stopMovie(setTarget)
  12. {
  13.    setTarget.stop();
  14. }
  15. function playMovie(setTarget)
  16. {
  17.    setTarget.play();
  18. }
  19. function scrubHandlePlay(setTarget)
  20. {
  21.    handle._x = (timeLine._width - handle._width) * (setTarget._currentframe / setTarget._totalframes);
  22. }
  23. function scrubHandle(setTarget)
  24. {
  25.    setTarget.gotoAndStop(int(setTarget._totalframes * (handle._x / (timeLine._width - handle._width))));
  26. }
  27. function theCurrentFrame(setTarget)
  28. {
  29.    return setTarget._currentframe;
  30. }
  31. function scrubEngine(theTarget, speed)
  32. {
  33.    var _loc1_ = theTarget;
  34.    if(scrubDirection == "reverse")
  35.    {
  36.       directionA = _loc1_._currentframe - Number(speed);
  37.       directionB = directionA;
  38.    }
  39.    else
  40.    {
  41.       directionA = _loc1_._currentframe + Number(speed);
  42.       directionB = directionA;
  43.    }
  44.    _loc1_.gotoAndStop(directionA);
  45.    if(directionA < 1)
  46.    {
  47.       _loc1_.gotoAndStop(1);
  48.    }
  49.    if(directionA > _loc1_._totalframes)
  50.    {
  51.       _loc1_.gotoAndStop(target._totalframes);
  52.       scrubTargetState = "stop";
  53.    }
  54.    if(scrubTargetState == "play")
  55.    {
  56.       _loc1_.play();
  57.    }
  58.    else
  59.    {
  60.       _loc1_.stop();
  61.    }
  62. }
  63. if(scrubTargetState == "play")
  64. {
  65.    playMovie(scrubTarget);
  66. }
  67. else
  68. {
  69.    stopMovie(scrubTarget);
  70. }
  71.